/*
 * Copyright 2010 - Jeremie Brebec
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.jb.coinche.client.business.model;

import org.jb.statemachine.client.AbstractState;

public class RoundFinished extends AbstractState implements GameState {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -6751912931336582897L;
	/**
	 * @param winner the winner to set
	 */
	public void setWinner(Player.Team winner) {
		this.winner = winner;
	}

	/**
	 * @return the winner
	 */
	public Player.Team getWinner() {
		return winner;
	}

	/**
	 * @param game the game to set
	 */
	public void setGame(Game game) {
		this.game = game;
	}

	/**
	 * @return the game
	 */
	public Game getGame() {
		return game;
	}

	/**
	 * 
	 * @param team
	 * @param score
	 */
	public void setTeamScore( Player.Team team, int score ) {
		if (team == Player.Team.T1) {
			team1_score = score;
		} else {
			team2_score = score;
		}
	}
	
	/**
	 * @param team1_score the team1_score to set
	 */
	public void setTeam1Score(int team1_score) {
		this.team1_score = team1_score;
	}

	/**
	 * @return the team1_score
	 */
	public int getTeam1Score() {
		return team1_score;
	}

	/**
	 * @param team2_score the team2_score to set
	 */
	public void setTeam2Score(int team2_score) {
		this.team2_score = team2_score;
	}

	/**
	 * @return the team2_score
	 */
	public int getTeam2Score() {
		return team2_score;
	}

	/**
	 * 
	 * @param team
	 * @param scoreInc
	 */
	public void setTeamScoreInc( Player.Team team, int scoreInc ) {
		if (team == Player.Team.T1) {
			team1_score_inc = scoreInc;
		} else {
			team2_score_inc = scoreInc;
		}
	}
	
	/**
	 * @param team1_score_inc the team1_score_inc to set
	 */
	public void setTeam1ScoreInc(int team1_score_inc) {
		this.team1_score_inc = team1_score_inc;
	}

	/**
	 * @return the team1_score_inc
	 */
	public int getTeam1ScoreInc() {
		return team1_score_inc;
	}

	/**
	 * @param team2_score_inc the team2_score_inc to set
	 */
	public void setTeam2ScoreInc(int team2_score_inc) {
		this.team2_score_inc = team2_score_inc;
	}

	/**
	 * @return the team2_score_inc
	 */
	public int getTeam2ScoreInc() {
		return team2_score_inc;
	}

	/**
	 * @param auction the auction to set
	 */
	public void setAuction(Auction auction) {
		this.auction = auction;
	}

	/**
	 * @return the auction
	 */
	public Auction getAuction() {
		return auction;
	}

	private Game game;
	private Player.Team winner;
	private int team1_score;
	private int team2_score;
	private int team1_score_inc;
	private int team2_score_inc;
	private Auction auction;

}
